package pong.game;

import pong.game.data.Data;
import pong.game.user.Party;
import pong.general.GameType;
import pong.general.SocialPongActivity;
import pong.mathematic.Engine;
import android.content.Context;
import android.view.MotionEvent;

public abstract class Game {

	public GameType gameType;

	public static Party Top = new Party(), Bottom = new Party();

	public Game(Context context, GameType gameType) {
		newGame(gameType, context);
	}

	public boolean isWin() {
		return false;
	}

	public void newGame(GameType gameType, Context context) {
		this.gameType = gameType;
		Data.dataReload(context);
	}

	public void newGame(Context context) {
		newGame(this.gameType, context);
	}

	public void run() {
		Engine.getInstance().sensorUpdate(SocialPongActivity.sensors.xPower, 0);
		Engine.getInstance().run();
	}

	public void touchScanner(MotionEvent e) {

	}

	public void destroy() {
		pause();

	}

	public void pause() {

	}

	public void start() {

	}
}
